// 是否授权
const isAuto = async () => {
  let p = await new Promise((r, c) => {
    wx.getSetting({
      success: (res) => {
        r(res)
      }
    })
  })
  if (p.authSetting['scope.userInfo']) {
    let p2 = await new Promise((r, c) => {
      wx.getUserInfo({
        success: (res) => {
          return r(true)
        }
      })
    })
    return true

  } else {
    return false
  }

}



module.exports = {
  isAuto
}